<template>
	<view>
		<view class="list" v-for="(item,index) in list" :key="index">
			<view class="leftDate">
				<view class="day">{{item.day}}</view>
				<view class="yearMs">{{item.year}}.{{item.mon}}</view>
				<view class="week">周四</view>
			</view>
			<view class="rightcont">
				<view>
					<view class="mubiao">{{item.title}}</view>
					<view class="wenti">{{item.description}}</view>
					<view class="fuzhir">
						<text class="time">{{item.hous}}:{{item.min}}  </text>
						<text>安全负责人-{{item.find_username}}</text>
					</view>
				</view>
				<image class="img" :src="baseURL+item.pics[0]" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	// 
	export default {
		data() {
			return {
				data:'',
				baseURL:this.$API.baseURL,
				deptid:uni.getStorageSync("deptid"),
				
				list:[]
			};
		},
		onShow: function() {
			this.fxsspsspLog();
		},
		methods: {
			fxsspsspLog(){
				var _this = this;
				uni.request({
					url:this.$API.fxsspsspLog,
					data:{
						page:1,
						rows:10,
						userid:uni.getStorageSync("userid"),
						is_delete:0
					},
					method:"GET",
					header:this.$API.get_head(),
					success: (res) => {
						res.data.rows.forEach(function(item,index){
							
							if(item.addtime!=null){
								item['year'] = item.addtime.slice(0,4);
								item['mon'] = item.addtime.slice(5,7);
								item['day'] = item.addtime.slice(8,10);
								item['hous'] = item.addtime.slice(11,13);
								item['min'] = item.addtime.slice(14,16);
								item['seconds'] = item.addtime.slice(17,19);
							}else{
								item['year'] = '2000';
								item['mon'] = '01';
								item['day'] = '01';
								item['hous'] = '00';
								item['min'] = '00';
								item['seconds'] = '00';
							}
							
							if(item.pics!=null){
								item.pics = item.pics.split(",")
							}
						})
						this.list = res.data.rows;
					},
					fail: () => {
						uni.showToast({
							title:"加载失败",
							icon:'none'
						})
					}
				})
			}
		},
	}
</script>

<style>
	page{background:#FFFFFF;}
	.list{display:flex;padding:24upx;}
	.leftDate{width:95upx;min-width:95upx;margin-right:20upx;}
	.day{font-size:36upx;font-weight:700;line-height:36upx;color:#000000;margin-top: 25rpx;}
	.yearMs{color:#000000;font-size:20upx;}
	.week{color: #868686;font-size:20upx;}
	
	.rightcont{width:100%;border: 1upx solid #dcdcdc;padding:13upx;display: flex;justify-content: space-between;position: relative;}
	/* .rightcont>view{} */
	.mubiao{color: #1eb89c;font-size:28upx;}
	.wenti{color: #000000;font-size:28upx;}
	.fuzhir{position: absolute;left:13upx;bottom: 13upx;font-size:24upx;color: #868686;}
	.fuzhir .text{margin-right:10upx;}
	.img{height:160upx;width:160upx;}
</style>
